function load_disease_list() {
    get_selfchecinglist([]);
}


function SelectLeastOne() {
    var ids = [];
    $("input[name='checkbox']:checked").each(function (i) {
        ids.push($(this).val());
    })
    get_selfchecinglist(ids);
}


//获取id，title，description
function get_selfchecinglist(by_disease_ids) {
    $.ajax({
        type: 'post',
        url: '/selfchecking/selectbyids1',
        dataType: "json",
        contentType: "application/json",
        data: JSON.stringify(by_disease_ids),
        success: function (disease_list) {
            let html2 = '';
            for (let i = 0; i < disease_list.length; i++) {
                html2 += ' ' +
                    '<li>\n' +
                    '   <div class="selfchecking_name">\n' +
                    '<a href="/selfchecking/selectOneSelfchecking/' + disease_list[i]['id'] + '">\n' +
                    '<h4>' + disease_list[i]['title'] + '</h4>\n' +
                    '</a>\n' +
                    '</div>\n' +
                    '<div class="selfchecking_description">\n' +
                    disease_list[i]['description'] +
                    '</div>\n' +
                    '</li>'
            }
            $("#selfchecking_list").html(html2);
        },
        error: function () {
           swal("获取失败")
        }
    });
}
